package com.day21.ClientDemo02;

import java.io.*;
import java.net.Socket;

public class SeverDemo{
            public static void main(String[] args) throws IOException {
                SeverSocket ss=new SeverSocket(10000);
                Socket s=ss.accept();
                BufferedReader br=new BufferedReader(new InputStreamReader(s.getInputStream()));
                BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
                String line;
                while((line=br.readLine())!=null){
                    bw.write(line);
                    bw.newLine();
                    bw.flush();;
                }
                bw.close();
                ss.close();
            }
        }
